package com.songlanyun.modules.useraddress.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.useraddress.entity.UserAddress;
import com.songlanyun.modules.useraddress.model.dto.UserAddressDTO;

import java.util.List;
import java.util.Map;

/**
 * 会员的收货地址表
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-11 14:49:27
 */
public interface UserAddressService extends IBaseService<Long,UserAddress> {

    UserAddress add(Long userId, UserAddressDTO address);
    UserAddress update(Long userId,UserAddressDTO address);
    void remove(Long userId,Long id);
    UserAddress getByUserIdAndId(Long userId,Long id);
    UserAddress getDefaultByUserId(Long userId);
    UserAddress setDefault(Long userId,Long id);
    List<UserAddress> myAddressList(Long userId);
}

